home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)G / (A)G6.ADF / seeker < prev    next >
Text File  |  1988-05-24  |  2KB  |  55 lines

  1. drive wheel 100           \ a wheel type drive with 100 armor \
  2. cpu 2x16bit               \ an average cpu \
  3. weapon mgun 40 50        \ b rocket rail with 40 armor and 50 rockets \
  4. weapon mgun 40 50
  5. weapon mgun 40 50
  6. weapon mgun 40 50
  7.  
  8. reg 5
  9.  
  10. equate direc 0
  11. equate dist  1
  12. equate width 2
  13. equate spd   3
  14.  
  15. posy, # 50, -
  16. posx, # 50, -
  17. atan2, # 180 +, sto direc     \ direction to center of arena \
  18. # 20, sto width               \ 20 degree beam width \
  19.  
  20. label start
  21. rcl width, rcl direc, radar   \ scan in front of you \
  22. x<0? goto nothing             \ nothing there?, then goto nothing \
  23.  
  24.      \ obviously, there's something there \
  25. sto dist
  26. # -20, +, rcl width, /, # 10, *
  27. x<0? # 0, sto spd
  28. speed                             \ if far, go in fast \
  29. rcl direc, heading                \ head towards it \
  30.  
  31. rcl width, # 1.5, rcl dist, /, r-d
  32. x<y? goto nofire                  \ don't fire unless you know where it is\
  33. rcl direc, aim                    \ aim at it \
  34. rcl dist\, rcl spd, # 20, /, -\     \ pull shot short \
  35. fire 0, fire 1, fire 2, fire 3                    \ kill!!!! \
  36. goto start                        \ keep firing \
  37.  
  38. label nofire  \ there's something there, but not exactly sure where. \
  39. # .6, sto* width
  40. goto start    \ narrow the width, and look again. \
  41.  
  42. label nothing   \ scanned, and didn't find anything \
  43. # 2, sto/ spd, rcl spd, speed     \ cut speed in half each time through \
  44. \rcl width, # 10, x>y?, sto width\  \ at least a 10 degree width \
  45. rcl width, sto+ direc             \ look to the left \
  46. rcl direc, radar x>0? goto start  \ if something's there, keep going (start)\
  47. rcl width, # 2, *, sto- direc     \ look to the right \
  48. rcl width, rcl direc, radar
  49. x>0? goto start                   \ if it's there, keep going (start)\
  50. rcl width, sto+ direc             \ go back to original direction \
  51. # 2, sto* width                   \ double the scan width \
  52. goto nothing                      \ look 'till you find something (nothing)\
  53.  
  54.  
  55.